package com.ssy.lingxi.report.entity.report;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 *   合同日报表
 * @author ds
 * @date 2021/6/10
 * @version 2.0.0
 */
@Entity
@Table(schema = "public", name = "rep_contract_day_report", indexes = {@Index(name = "rep_contract_day_report_date_time_idx", columnList = "dateTime")})
public class ContractDayReportDO implements Serializable {

    private static final long serialVersionUID = -8832712315607362341L;

    public ContractDayReportDO() {
        this.dateTime = LocalDateTime.of(LocalDate.now(), LocalTime.MIN);
        this.count = 0L;
        this.amount = 0D;
    }

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "contract_day_report_seq")
    @SequenceGenerator(sequenceName = "rep_contract_day_report_seq", name = "contract_day_report_seq", allocationSize = 1)
    private Long id;

    /**
     * 日期时间
     */
    @Column(columnDefinition = "timestamp")
    private LocalDateTime dateTime;

    /**
     * 数量
     */
    @Column(columnDefinition = "int8", nullable = false)
    private Long count;

    /**
     * 采购金额
     */
    @Column(columnDefinition = "decimal", nullable = false)
    private Double amount;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public LocalDateTime getDateTime() {
        return dateTime;
    }

    public void setDateTime(LocalDateTime dateTime) {
        this.dateTime = dateTime;
    }

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }
}
